*Note: This code estimates Models 2-5 reported in Tables A.4, A.6, A.8, A.10, A.12, A.14, A.16, and A.20 of the
	*Supplemental Appendix. To do so, it reads-in the Stata .dta file "MainMalariaDataset.dta" and then prints
	* relevant table output to screen.

*clear Stata
clear
clear matrix

*set memory
set more 1
set matsize 400
set mem 500m

*set working directory
cd  ""

*start log file
log using "Models_2_through_5_Tables_A4_A6_A8_A10_A12_A14_A16_A20", replace

*read-in directed dyadic data
use "MainMalariaDataset.dta"

**************************************************************************************
**Table A.4: Determinants of Directed Diplomatic Representation, Main Specifications**
**************************************************************************************

*Pooled model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11

*Pooled (clustered se's) model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, i(ddyad) 


*****************************************************************************************
**Table A.6: Determinants of Directed Diplomatic Representation, Non-lagged Covariatess**
*****************************************************************************************

*Pooled model
logit dr_1_at_2_m malaria_interp_2_m cid_per_trop_2_m log_distance_m log_trade_m colony_m dr_2_at_1_m   log_gdppc_1_m log_gdppc_2_m s2_m ln_cinc_1_m ln_cinc_2_m dem_int_m democracy_1_m democracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m malaria_interp_2_m cid_per_trop_2_m log_distance_m log_trade_m colony_m dr_2_at_1_m   log_gdppc_1_m log_gdppc_2_m s2_m ln_cinc_1_m ln_cinc_2_m dem_int_m democracy_1_m democracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m malaria_interp_2_m cid_per_trop_2_m log_distance_m log_trade_m colony_m dr_2_at_1_m   log_gdppc_1_m log_gdppc_2_m s2_m ln_cinc_1_m ln_cinc_2_m dem_int_m democracy_1_m democracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m malaria_interp_2_m cid_per_trop_2_m log_distance_m log_trade_m colony_m dr_2_at_1_m   log_gdppc_1_m log_gdppc_2_m s2_m ln_cinc_1_m ln_cinc_2_m dem_int_m democracy_1_m democracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 


**************************************************************************************************
**Table A.8: Determinants of Directed Diplomatic Representation, Non-lagged Independent Variable**
**************************************************************************************************

*Pooled model
logit dr_1_at_2_m malaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11

*Pooled (clustered se's) model
logit dr_1_at_2_m malaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m malaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m malaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11, i(ddyad) 


*******************************************************************************************************************
**Table A.10: Determinants of Directed Diplomatic Representation, Omitting Non-Malarial Diplomatic Host Countries**
*******************************************************************************************************************

*Pooled model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 if Lmalaria_interp_2_m>0

*Pooled (clustered se's) model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 if Lmalaria_interp_2_m>0, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 if Lmalaria_interp_2_m>0, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 if Lmalaria_interp_2_m>0, i(ddyad) 


****************************************************************************************************
**Table A.12: Determinants of Directed Diplomatic Representation, Non-Interpolated Malaria Measure**
****************************************************************************************************

*Pooled model
logit dr_1_at_2_m  Lcid_malaria_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m  Lcid_malaria_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m  Lcid_malaria_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m  Lcid_malaria_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 

 
****************************************************************************************************
**Table A.14: Determinants of Directed Diplomatic Representation, Population-based Malaria Measure**
****************************************************************************************************

*Pooled model
logit dr_1_at_2_m Lmalaria_interp_pop_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m Lmalaria_interp_pop_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m Lmalaria_interp_pop_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m Lmalaria_interp_pop_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 


*************************************************************************************************************
**Table A.16: Determinants of Directed Diplomatic Representation, Combined Endemic Disease Exposure Measure**
*************************************************************************************************************

*Pooled model
logit dr_1_at_2_m L_total_exposure_2 Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m L_total_exposure_2 Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m  t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m L_total_exposure_2 Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m L_total_exposure_2 Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 


*******************************************************************************************
**Table A.20: Determinants of Directed Diplomatic Representation, Expanded Control Models**
*******************************************************************************************

*Pooled model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m Linternal_conf_2_m Lexternal_conf_2_m  Lln_irst_2_m Lln_milex_2_m Lln_milper_2_m Lln_pec_2_m Lln_upop_2_m entryy_2_m t3 t4 t5 t6 t7 t8 t9 t10 t11 t12

*Pooled (clustered se's) model
logit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m Linternal_conf_2_m Lexternal_conf_2_m  Lln_irst_2_m Lln_milex_2_m Lln_milper_2_m Lln_pec_2_m Lln_upop_2_m entryy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, cluster(ddyad)

*Fixed effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m Linternal_conf_2_m Lexternal_conf_2_m  Lln_irst_2_m Lln_milex_2_m Lln_milper_2_m Lln_pec_2_m Lln_upop_2_m entryy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) fe

*Random effects model
xtlogit dr_1_at_2_m Lmalaria_interp_2_m Lcid_per_trop_2_m Llog_distance_m Llog_trade_m Lcolony_m Ldr_2_at_1_m   Llog_gdppc_1_m Llog_gdppc_2_m Ls2_m Lln_cinc_1_m Lln_cinc_2_m Ldem_int_m Ldemocracy_1_m Ldemocracy_2_m Linternal_conf_2_m Lexternal_conf_2_m  Lln_irst_2_m Lln_milex_2_m Lln_milper_2_m Lln_pec_2_m Lln_upop_2_m entryy_2_m t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12, i(ddyad) 

*close log file
log close
